var time = 60;
var hp = 300;
var fistClick = true;
var sj = 0;
var sjShow;
var mark = 0;
var dishu = document.getElementById("dishu");
function sjDishu(){
			dishu.style.display = "none";
			if(time==0){
				clearInterval(sjShow);
			}
			sj=0;
			while(sj==0||sj==10){
				sj = Math.round(Math.random()*10);
			}
			setTimeout(function(){
				if(sj==1){
					dishu.style.cssText = "left:80px; top:64px; display:list-item;";
				}else if(sj==2){
					dishu.style.cssText = "left:190px; top:64px; display:list-item;";
				}else if(sj==3){
					dishu.style.cssText = "left:310px; top:66px; display:list-item;";	
				}else if(sj==4){
					dishu.style.cssText = "left:62px; top:125px; display:list-item;";	
				}else if(sj==5){
					dishu.style.cssText = "left:191px; top:125px; display:list-item;";	
				}else if(sj==6){
					dishu.style.cssText = "left:314px; top:125px; display:list-item;";	
				}else if(sj==7){
					dishu.style.cssText = "left:56px; top:190px; display:list-item;";	
				}else if(sj==8){
					dishu.style.cssText = "left:193px; top:194px; display:list-item;";	
				}else{
					dishu.style.cssText = "left:325px; top:193px; display:list-item;";	
				}
			},800);
		}
function start(){
	if(fistClick){
		fistClick = false;
		var timeOver = setInterval(function(){
			document.getElementById("time").innerHTML = --time;
			if(time==0){
				clearInterval(timeOver);
			}		
		},1000);
		var hpOver = setInterval(function(){
			hp--;
			document.getElementById("HP").style.width = hp+"px";
			if(hp==0){
				alert("GAME OVER!"+"\n"+"您的分数:"+mark);
				clearInterval(hpOver);
			}
		},200);
		sjShow = setInterval("sjDishu()",700);
	}
}
function getUp(){
	dishu.style.display = "none";
	if(time!=0){
		mark++;
	}
	document.getElementById("mark").innerHTML = mark;
}
